package dd.prog2.musterExercises.ws12set03_function;

public class Derivation extends Function {

	private Function f;
	private double delta;
	
	public Derivation(Function f, double delta) {
		this.f = f;
		this.delta = delta;
	}
	
	@Override
	public double map(double x) {
		return (f.map(x+delta)-f.map(x-delta)) / (2 * delta);
	}

}
